//
// Created by lingzhitech on 25-9-18.
//

#ifndef QUERYRESULT_H
#define QUERYRESULT_H
#include <iosfwd>
#include <memory>
#include <ostream>
#include <set>
#include <vector>
// 12章
std::string make_plural(size_t ctr, const std::string& word,
                        const std::string& ending);
class QueryResult {
    using line_no = std::vector<std::string>::size_type;

    friend std::ostream &print(std::ostream &, const QueryResult &);

public:
    QueryResult(std::string s, std::shared_ptr<std::set<line_no> > p,
                std::shared_ptr<std::vector<std::string> > f): sought(s), lines(p), file(f) {
    }
    private:
    std::string sought;
    std::shared_ptr<std::set<line_no> > lines;
    std::shared_ptr<std::vector<std::string> > file;
};



#endif //QUERYRESULT_H
